package com.asl.website.contactInfo.service.impl;

import java.util.List;
import com.asl.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.asl.website.contactInfo.mapper.SysContactInfoMapper;
import com.asl.website.contactInfo.domain.SysContactInfo;
import com.asl.website.contactInfo.service.ISysContactInfoService;

/**
 * 联系信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-21
 */
@Service
public class SysContactInfoServiceImpl implements ISysContactInfoService 
{
    @Autowired
    private SysContactInfoMapper sysContactInfoMapper;

    /**
     * 查询联系信息
     * 
     * @param id 联系信息主键
     * @return 联系信息
     */
    @Override
    public SysContactInfo selectSysContactInfoById(Long id)
    {
        return sysContactInfoMapper.selectSysContactInfoById(id);
    }

    /**
     * 查询联系信息列表
     * 
     * @param sysContactInfo 联系信息
     * @return 联系信息
     */
    @Override
    public List<SysContactInfo> selectSysContactInfoList(SysContactInfo sysContactInfo)
    {
        return sysContactInfoMapper.selectSysContactInfoList(sysContactInfo);
    }

    /**
     * 新增联系信息
     * 
     * @param sysContactInfo 联系信息
     * @return 结果
     */
    @Override
    public int insertSysContactInfo(SysContactInfo sysContactInfo)
    {
        sysContactInfo.setCreateTime(DateUtils.getNowDate());
        return sysContactInfoMapper.insertSysContactInfo(sysContactInfo);
    }

    /**
     * 修改联系信息
     * 
     * @param sysContactInfo 联系信息
     * @return 结果
     */
    @Override
    public int updateSysContactInfo(SysContactInfo sysContactInfo)
    {
        sysContactInfo.setUpdateTime(DateUtils.getNowDate());
        return sysContactInfoMapper.updateSysContactInfo(sysContactInfo);
    }

    /**
     * 批量删除联系信息
     * 
     * @param ids 需要删除的联系信息主键
     * @return 结果
     */
    @Override
    public int deleteSysContactInfoByIds(Long[] ids)
    {
        return sysContactInfoMapper.deleteSysContactInfoByIds(ids);
    }

    /**
     * 删除联系信息信息
     * 
     * @param id 联系信息主键
     * @return 结果
     */
    @Override
    public int deleteSysContactInfoById(Long id)
    {
        return sysContactInfoMapper.deleteSysContactInfoById(id);
    }
}
